<?php

/*
 * 预报入库业务类
 */
class Application_Model_ingstoreproduct extends Application_Model_DomainObject{
    
        protected $_id;//序号

	    protected $_ingstoreid;//
	
	    protected $_productid;//
        
        protected $_productname;// 商品名
        
        protected $_url;// 商品链接地址
        
        protected $_image;// 商品图片
        
        protected $_state;// 商品状态

        protected $_price; //商品价格

        protected $_qty; //商品数量

        protected $_attribute; //商品属性
 
        protected $_remark; //商品描述

        protected $_ckPass; //物品问题

        protected $_status; //问题状态  1.少货 2.发错货
        
        /**
         * 已退款
         */
        const Insert_Refund = 1;
        /**
         * 少货
         */
        const Insert_Less = 2;
        /**
         * 发错货
         */
        const Insert_Error = 3;

        /**
         * 问题包裹
         */
        const Insert_Problem = -1;

        private static function getDb(){
		return new Application_Model_DbTable_ingstoreproduct();
	}
        
        public static function getbyingstoreid($ingstoreid){
            $result=Application_Model_ingstoreproduct::getDb()->getbyingstoreid($ingstoreid);
            return $result;
        }
        
        public function getimageFile(){
            
            if($this->_image==null || $this->_image=='')
            {
                return '/../'.Application_Model_Product::DEFAULT_IMAGE;
            }
            else
            {
                return '/'.$this->_image;
            }        
        }
}
?>
